<?php
namespace Core\CoreContracts;

use Core;
/*
* Event article model definition
*
* @method Create($event, $article)
*/
class EventArticle {

	/**
    * @property integer $Id The event unique identifier
    */
	public $Id;
	
	/**
    * @property integer $Event The associated event
    */
	public $Event;
	
	/**
    * @property integer $Article The associated article
    */
	public $Article;
	
	/**
    * @property datetime $ModificationDate The event modification date
    */
	public $ModificationDate;
	
	/**
    * @property datetime $CreationDate The event creation date
    */
	public $CreationDate;
	
	/**
	* The default constructor
	*/
	public function __construct()  {  }
	
	/**
	* Build a new event object
	*
	* @param Event $event The event 
	* @param Article $article The article
	*
	* @return Return a new event object
	*/
	public static function Create($event, $article)
	{
		$eventArticle = new Core\CoreContracts\EventArticle();
		$eventArticle->Event = $event;
		$eventArticle->Article = $article;
		$eventArticle->ModificationDate = date("Y-m-d H:i:s");
		$eventArticle->CreationDate = date("Y-m-d H:i:s");
		return $eventArticle;
	}
}
?> 